﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Controller;
using Entity;
namespace Web
{
    public partial class CustomerList : System.Web.UI.Page
    {
        IList<CustomerEntity> customerEntities = new List<CustomerEntity>();
        CustomerController customerController = new CustomerController();
        protected void Page_Load(object sender, EventArgs e)
        {
            customerEntities = customerController.finAllCustomers();
            this.CustomerGridView.DataSource = customerEntities;
            this.CustomerGridView.DataBind();
        }

        protected void AddButton_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/CreateCustomer.aspx");
        }
    }
}